import request from "../utils/request";

export function getBlogs(page = 1, pageSize = 20) {
  return request.get('/blogs', {
    params: {
      page, pageSize
    }
  })
}

export function addBlog(blog) {
  return request.post('/blogs', {content: blog});
}

export function deleteBlog(id) {
  return request.delete('/blogs', {
    params: {id}
  });
}
